---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
C:\ProgramData\Anaconda2\envs\python3\lib\site-packages\tensorflow\python\client\session.py in _run(self, handle, fetches, feed_dict, options, run_metadata)
929 subfeed_t = self.graph.as_graph_element(subfeed, allow_tensor=True,
--> 930 allow_operation=False)
931 except Exception as e:
C:\ProgramData\Anaconda2\envs\python3\lib\site-packages\tensorflow\python\framework\ops.py in as_graph_element(self, obj, allow_tensor, allow_operation)
2413 with self._lock:
-> 2414 return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
2415
C:\ProgramData\Anaconda2\envs\python3\lib\site-packages\tensorflow\python\framework\ops.py in _as_graph_element_locked(self, obj, allow_tensor, allow_operation)
2492 if obj.graph is not self:
-> 2493 raise ValueError("Tensor %s is not an element of this graph." % obj)
2494 return obj
ValueError: Tensor Tensor("lstm_1_input:0", shape=(?, ?, 4), dtype=float32) is not an element of this graph.
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
<ipython-input-7-c5abe4a4b27c> in <module>()
11 predictions = model.predict_generator(
12 generator_strip_xy(data_gen_test, true_values),
---> 13 steps=steps_test
14 )
15
C:\ProgramData\Anaconda2\envs\python3\lib\site-packages\keras\legacy\interfaces.py in wrapper(*args, **kwargs)
86 warnings.warn('Update your `' + object_name +
87 '` call to the Keras 2 API: ' + signature, stacklevel=2)
---> 88 return func(*args, **kwargs)
89 wrapper._legacy_support_signature = inspect.getargspec(func)
90 return wrapper
C:\ProgramData\Anaconda2\envs\python3\lib\site-packages\keras\models.py in predict_generator(self, generator, steps, max_q_size, workers, pickle_safe, verbose)
1195 workers=workers,
1196 pickle_safe=pickle_safe,
-> 1197 verbose=verbose)
1198
1199 def get_config(self):
C:\ProgramData\Anaconda2\envs\python3\lib\site-packages\keras\legacy\interfaces.py in wrapper(*args, **kwargs)
86 warnings.warn('Update your `' + object_name +
87 '` call to the Keras 2 API: ' + signature, stacklevel=2)
---> 88 return func(*args, **kwargs)
89 wrapper._legacy_support_signature = inspect.getargspec(func)
90 return wrapper
C:\ProgramData\Anaconda2\envs\python3\lib\site-packages\keras\engine\training.py in predict_generator(self, generator, steps, max_q_size, workers, pickle_safe, verbose)
2118 x = generator_output
2119
-> 2120 outs = self.predict_on_batch(x)
2121 if not isinstance(outs, list):
2122 outs = [outs]
C:\ProgramData\Anaconda2\envs\python3\lib\site-packages\keras\engine\training.py in predict_on_batch(self, x)
1703 ins = x
1704 self._make_predict_function()
-> 1705 outputs = self.predict_function(ins)
1706 if len(outputs) == 1:
1707 return outputs[0]
C:\ProgramData\Anaconda2\envs\python3\lib\site-packages\keras\backend\tensorflow_backend.py in __call__(self, inputs)
2267 updated = session.run(self.outputs + [self.updates_op],
2268 feed_dict=feed_dict,
-> 2269 **self.session_kwargs)
2270 return updated[:len(self.outputs)]
2271
C:\ProgramData\Anaconda2\envs\python3\lib\site-packages\tensorflow\python\client\session.py in run(self, fetches, feed_dict, options, run_metadata)
776 try:
777 result = self._run(None, fetches, feed_dict, options_ptr,
--> 778 run_metadata_ptr)
779 if run_metadata:
780 proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)
C:\ProgramData\Anaconda2\envs\python3\lib\site-packages\tensorflow\python\client\session.py in _run(self, handle, fetches, feed_dict, options, run_metadata)
931 except Exception as e:
932 raise TypeError('Cannot interpret feed_dict key as Tensor: '
--> 933 + e.args[0])
934
935 if isinstance(subfeed_val, ops.Tensor):
TypeError: Cannot interpret feed_dict key as Tensor: Tensor Tensor("lstm_1_input:0", shape=(?, ?, 4), dtype=float32) is not an element of this graph.